package ee.rsi2m.goproject.service;

import android.util.Log;

import ee.rsi2m.goproject.model.GoBoard;
import ee.rsi2m.goproject.model.GoStone;

public class GoStoneFactory {

	public static GoStone getStone(GoBoard board, int relativeX, int relativeY) {
		
		if (relativeX > board.size || relativeY > board.size) {
			Log.w("Nulls","Null returned for X:"+relativeX+" Y:"+relativeY);
			return null;
		}
		
		if (relativeX <= 0 || relativeY <=0) {
			Log.w("Nulls","Null returned for X:"+relativeX+" Y:"+relativeY);
			return null;
		}
		Log.w("Nulls","It's okay for X:"+relativeX+" Y:"+relativeY);
		return board.boardState[relativeX][relativeY];

	}

}
